class SitemapController < ApplicationController
  def index
    @galleries          = Gallery.find  :all
    @photos             = Photo.find    :all, :conditions => ['parent_id IS ?', nil], :order => 'created_at desc'
    @videos             = Video.find    :all
    @pages              = Page.find     :all
    @galleries.reject!  {|gallery|  gallery.private?    || gallery.invisible?}
    @photos.reject!     {|photo|    photo.is_private?   || photo.is_invisible?}
    @videos.reject!     {|video|    video.is_private?   || video.is_invisible?}
    @pages.reject!      {|page|     page.is_private?    || page.is_invisible?}
    render :layout => false
  end
end
